﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FireZone.NativeWMDMInteface
{
    internal enum WMDM_TAG_DATATYPE
    {
        WMDM_TYPE_DWORD = 0,
        WMDM_TYPE_STRING = 1,
        WMDM_TYPE_BINARY = 2,
        WMDM_TYPE_BOOL = 3,
        WMDM_TYPE_QWORD = 4,
        WMDM_TYPE_WORD = 5,
        WMDM_TYPE_GUID = 6,
        WMDM_TYPE_DATE = 7
    } 	;

    internal enum WMDM_STORAGE_ENUM_MODE
    {
        ENUM_MODE_RAW = 0,
        ENUM_MODE_USE_DEVICE_PREF = (ENUM_MODE_RAW + 1),
        ENUM_MODE_METADATA_VIEWS = (ENUM_MODE_USE_DEVICE_PREF + 1)
    } 	;

    [Flags]
    internal enum WMDM_STORAGE_ATTR
    {
        WMDM_STORAGE_ATTR_FILESYSTEM = 0x00000001,
        WMDM_STORAGE_ATTR_REMOVABLE = 0x00000002,
        WMDM_STORAGE_ATTR_NONREMOVABLE = 0x00000004,
        WMDM_FILE_ATTR_FOLDER = 0x00000008,
        WMDM_FILE_ATTR_LINK = 0x00000010,
        WMDM_FILE_ATTR_FILE = 0x00000020,
        WMDM_FILE_ATTR_VIDEO = 0x00000040,
        WMDM_STORAGE_ATTR_CANEDITMETADATA = 0x00000080,
        WMDM_STORAGE_ATTR_FOLDERS = 0x00000100,
        WMDM_FILE_ATTR_AUDIO = 0x00001000,
        WMDM_FILE_ATTR_DATA = 0x00002000,
        WMDM_FILE_ATTR_CANPLAY = 0x00004000,
        WMDM_FILE_ATTR_CANDELETE = 0x00008000,
        WMDM_FILE_ATTR_CANMOVE = 0x00010000,
        WMDM_FILE_ATTR_CANRENAME = 0x00020000,
        WMDM_FILE_ATTR_CANREAD = 0x00040000,
        WMDM_FILE_ATTR_MUSIC = 0x00080000,
        WMDM_FILE_CREATE_OVERWRITE = 0x00100000,
        WMDM_FILE_ATTR_AUDIOBOOK = 0x00200000,
        WMDM_FILE_ATTR_HIDDEN = 0x00400000,
        WMDM_FILE_ATTR_SYSTEM = 0x00800000,
        WMDM_FILE_ATTR_READONLY = 0x01000000,
        WMDM_STORAGE_ATTR_HAS_FOLDERS = 0x02000000,
        WMDM_STORAGE_ATTR_HAS_FILES = 0x04000000,
        WMDM_STORAGE_IS_DEFAULT = 0x08000000,
        WMDM_STORAGE_CONTAINS_DEFAULT = 0x10000000,
        WMDM_STORAGE_ATTR_VIRTUAL = 0x20000000,
    };

    internal enum WMDM_STORAGE_CAP
    {
        WMDM_STORAGECAP_FOLDERSINROOT = 0x00000001,
        WMDM_STORAGECAP_FILESINROOT = 0x00000002,
        WMDM_STORAGECAP_FOLDERSINFOLDERS = 0x00000004,
        WMDM_STORAGECAP_FILESINFOLDERS = 0x00000008,
        WMDM_STORAGECAP_FOLDERLIMITEXISTS = 0x00000010,
        WMDM_STORAGECAP_FILELIMITEXISTS = 0x00000020,
        WMDM_STORAGECAP_NOT_INITIALIZABLE = 0x00000040,
    };

    [Flags]
    internal enum WMDM_MODE
    {
        WMDM_MODE_BLOCK = 0x00000001,
        WMDM_MODE_THREAD = 0x00000002,
        WMDM_CONTENT_FILE = 0x00000004,
        WMDM_CONTENT_FOLDER = 0x00000008,
        WMDM_CONTENT_OPERATIONINTERFACE = 0x00000010,
        WMDM_MODE_QUERY = 0x00000020,
        WMDM_MODE_PROGRESS = 0x00000040,
        WMDM_MODE_TRANSFER_PROTECTED = 0x00000080,
        WMDM_MODE_TRANSFER_UNPROTECTED = 0x00000100,
        WMDM_STORAGECONTROL_INSERTBEFORE = 0x00000200,
        WMDM_STORAGECONTROL_INSERTAFTER = 0x00000400,
        WMDM_STORAGECONTROL_INSERTINTO = 0x00000800,
        WMDM_MODE_RECURSIVE = 0x00001000,
    };

    [Flags]
    internal enum WMDM_RIGHTS
    {
        WMDM_RIGHTS_PLAY_ON_PC = 0x00000001,
        WMDM_RIGHTS_COPY_TO_NON_SDMI_DEVICE = 0x00000002,
        WMDM_RIGHTS_COPY_TO_CD = 0x00000008,
        WMDM_RIGHTS_COPY_TO_SDMI_DEVICE = 0x00000010,
    };

    internal enum WMDM_SEEK
    {
        WMDM_SEEK_BEGIN = 0x00000001,
        WMDM_SEEK_CURRENT = 0x00000002,
        WMDM_SEEK_END = 0x00000008,
    };

    internal enum WMDM_FORMATCODE : uint
    {
        WMDM_FORMATCODE_NOTUSED = 0,
        WMDM_FORMATCODE_ALLIMAGES = unchecked((uint)-1),

        /// <summary>
        /// Predefine
        /// </summary>
        WMDM_FORMATCODE_UNDEFINED = 0x3000,
        WMDM_FORMATCODE_ASSOCIATION = 0x3001,
        WMDM_FORMATCODE_SCRIPT = 0x3002,
        WMDM_FORMATCODE_EXECUTABLE = 0x3003,
        WMDM_FORMATCODE_TEXT = 0x3004,
        WMDM_FORMATCODE_HTML = 0x3005,
        WMDM_FORMATCODE_DPOF = 0x3006,
        WMDM_FORMATCODE_AIFF = 0x3007,
        WMDM_FORMATCODE_WAVE = 0x3008,
        WMDM_FORMATCODE_MP3 = 0x3009,
        WMDM_FORMATCODE_AVI = 0x300a,
        WMDM_FORMATCODE_MPEG = 0x300b,
        WMDM_FORMATCODE_ASF = 0x300c,

        WMDM_FORMATCODE_RESERVED_FIRST = 0x300d,
        WMDM_FORMATCODE_RESERVED_LAST = 0x37ff,

        /// <summary>
        /// Image
        /// </summary>
        WMDM_FORMATCODE_IMAGE_UNDEFINED = 0x3800,
        WMDM_FORMATCODE_IMAGE_EXIF = 0x3801,
        WMDM_FORMATCODE_IMAGE_TIFFEP = 0x3802,
        WMDM_FORMATCODE_IMAGE_FLASHPIX = 0x3803,
        WMDM_FORMATCODE_IMAGE_BMP = 0x3804,
        WMDM_FORMATCODE_IMAGE_CIFF = 0x3805,
        WMDM_FORMATCODE_IMAGE_GIF = 0x3807,
        WMDM_FORMATCODE_IMAGE_JFIF = 0x3808,
        WMDM_FORMATCODE_IMAGE_PCD = 0x3809,
        WMDM_FORMATCODE_IMAGE_PICT = 0x380a,
        WMDM_FORMATCODE_IMAGE_PNG = 0x380b,
        WMDM_FORMATCODE_IMAGE_TIFF = 0x380d,
        WMDM_FORMATCODE_IMAGE_TIFFIT = 0x380e,
        WMDM_FORMATCODE_IMAGE_JP2 = 0x380f,
        WMDM_FORMATCODE_IMAGE_JPX = 0x3810,

        WMDM_FORMATCODE_IMAGE_RESERVED_FIRST = 0x3811,
        WMDM_FORMATCODE_IMAGE_RESERVED_LAST = 0x3fff,

        /// <summary>
        /// Firmware
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDFIRMWARE = 0xb802,
        WMDM_FORMATCODE_WINDOWSIMAGEFORMAT = 0xb881,


        /// <summary>
        /// Audio
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDAUDIO = 0xb900,
        WMDM_FORMATCODE_WMA = 0xb901,
        WMDM_FORMATCODE_OGG = 0xb902,
        WMDM_FORMATCODE_AAC = 0xb903,
        WMDM_FORMATCODE_AUDIBLE = 0xb904,
        WMDM_FORMATCODE_FLAC = 0xb906,

        /// <summary>
        /// Video
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDVIDEO = 0xb980,
        WMDM_FORMATCODE_WMV = 0xb981,
        WMDM_FORMATCODE_MP4 = 0xb982,
        WMDM_FORMATCODE_MP2 = 0xb983,
        WMDM_FORMATCODE_3GP = 0xb984,

        WMDM_FORMATCODE_MKV = 0xb990,

        /// <summary>
        /// Playlist
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDCOLLECTION = 0xba00,
        WMDM_FORMATCODE_ABSTRACTMULTIMEDIAALBUM = 0xba01,
        WMDM_FORMATCODE_ABSTRACTIMAGEALBUM = 0xba02,
        WMDM_FORMATCODE_ABSTRACTAUDIOALBUM = 0xba03,
        WMDM_FORMATCODE_ABSTRACTVIDEOALBUM = 0xba04,
        WMDM_FORMATCODE_ABSTRACTAUDIOVIDEOPLAYLIST = 0xba05,
        WMDM_FORMATCODE_ABSTRACTCONTACTGROUP = 0xba06,
        WMDM_FORMATCODE_ABSTRACTMESSAGEFOLDER = 0xba07,
        WMDM_FORMATCODE_ABSTRACTCHAPTEREDPRODUCTION = 0xba08,
        WMDM_FORMATCODE_MEDIA_CAST = 0xba0b,
        WMDM_FORMATCODE_WPLPLAYLIST = 0xba10,
        WMDM_FORMATCODE_M3UPLAYLIST = 0xba11,
        WMDM_FORMATCODE_MPLPLAYLIST = 0xba12,
        WMDM_FORMATCODE_ASXPLAYLIST = 0xba13,
        WMDM_FORMATCODE_PLSPLAYLIST = 0xba14,
        WMDM_FORMATCODE_FIREZONEPLAYLIST = 0xba20,

        /// <summary>
        /// Document
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDDOCUMENT = 0xba80,
        WMDM_FORMATCODE_ABSTRACTDOCUMENT = 0xba81,
        WMDM_FORMATCODE_XMLDOCUMENT = 0xba82,
        WMDM_FORMATCODE_MICROSOFTWORDDOCUMENT = 0xba83,
        WMDM_FORMATCODE_MHTCOMPILEDHTMLDOCUMENT = 0xba84,
        WMDM_FORMATCODE_MICROSOFTEXCELSPREADSHEET = 0xba85,
        WMDM_FORMATCODE_MICROSOFTPOWERPOINTDOCUMENT = 0xba86,

        /// <summary>
        /// Message
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDMESSAGE = 0xbb00,
        WMDM_FORMATCODE_ABSTRACTMESSAGE = 0xbb01,

        /// <summary>
        /// Contact
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDCONTACT = 0xbb80,
        WMDM_FORMATCODE_ABSTRACTCONTACT = 0xbb81,
        WMDM_FORMATCODE_VCARD2 = 0xbb82,
        WMDM_FORMATCODE_VCARD3 = 0xbb83,

        /// <summary>
        /// CalenderItem
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDCALENDARITEM = 0xbe00,
        WMDM_FORMATCODE_ABSTRACTCALENDARITEM = 0xbe01,
        WMDM_FORMATCODE_VCALENDAR1 = 0xbe02,
        WMDM_FORMATCODE_VCALENDAR2 = 0xbe03,

        /// <summary>
        /// WindowsExecutable
        /// </summary>
        WMDM_FORMATCODE_UNDEFINEDWINDOWSEXECUTABLE = 0xbe80,

        WMDM_FORMATCODE_M4A = 0x4d503441,
        WMDM_FORMATCODE_3GPA = 0x33475041,
        WMDM_FORMATCODE_SECTION = 0xbe82
    } 	;
    internal enum WMDM_FIND_SCOPE
    {
        WMDM_FIND_SCOPE_GLOBAL = 0,
        WMDM_FIND_SCOPE_IMMEDIATE_CHILDREN = (WMDM_FIND_SCOPE_GLOBAL + 1)
    };
    [Flags]
    internal enum WMDMDeviceEnumPreference
    {
        DO_NOT_VIRTUALIZE_STORAGES_AS_DEVICES = 0x00000001,
        ALLOW_OUTOFBAND_NOTIFICATION = 0x00000002,
    };

    internal enum WMDMDeviceNotification
    {
        WMDM_MSG_DEVICE_ARRIVAL = 0,
        WMDM_MSG_DEVICE_REMOVAL = (WMDM_MSG_DEVICE_ARRIVAL + 1),
        WMDM_MSG_MEDIA_ARRIVAL = (WMDM_MSG_DEVICE_REMOVAL + 1),
        WMDM_MSG_MEDIA_REMOVAL = (WMDM_MSG_MEDIA_ARRIVAL + 1)
    } ;

    [Flags]
    internal enum WMDMDeviceType
    {
        WMDM_DEVICE_TYPE_PLAYBACK = 0x00000001,
        WMDM_DEVICE_TYPE_RECORD = 0x00000002,
        WMDM_DEVICE_TYPE_DECODE = 0x00000004,
        WMDM_DEVICE_TYPE_ENCODE = 0x00000008,
        WMDM_DEVICE_TYPE_STORAGE = 0x00000010,
        WMDM_DEVICE_TYPE_VIRTUAL = 0x00000020,
        WMDM_DEVICE_TYPE_SDMI = 0x00000040,
        WMDM_DEVICE_TYPE_NONSDMI = 0x00000080,
        WMDM_DEVICE_TYPE_NONREENTRANT = 0x00000100,
        WMDM_DEVICE_TYPE_FILELISTRESYNC = 0x00000200,
        WMDM_DEVICE_TYPE_VIEW_PREF_METADATAVIEW = 0x00000400,
    };

    [Flags]
    internal enum WMDMDeviceCapability
    {
        WMDM_DEVICECAP_CANPLAY = 0x00000001,
        WMDM_DEVICECAP_CANSTREAMPLAY = 0x00000002,
        WMDM_DEVICECAP_CANRECORD = 0x00000004,
        WMDM_DEVICECAP_CANSTREAMRECORD = 0x00000008,
        WMDM_DEVICECAP_CANPAUSE = 0x00000010,
        WMDM_DEVICECAP_CANRESUME = 0x00000020,
        WMDM_DEVICECAP_CANSTOP = 0x00000040,
        WMDM_DEVICECAP_CANSEEK = 0x00000080,
        WMDM_DEVICECAP_HASSECURECLOCK = 0x00000100,
    };

    [Flags]
    internal enum WMDMPowerSource
    {
        WMDM_POWER_CAP_BATTERY = 0x00000001,
        WMDM_POWER_CAP_EXTERNAL = 0x00000002,
        WMDM_POWER_IS_BATTERY = 0x00000004,
        WMDM_POWER_IS_EXTERNAL = 0x00000008,
        WMDM_POWER_PERCENT_AVAILABLE = 0x00000010,
    };

    [Flags]
    internal enum WMDMDeviceStatus
    {
        WMDM_STATUS_READY = 0x00000001,
        WMDM_STATUS_BUSY = 0x00000002,
        WMDM_STATUS_DEVICE_NOTPRESENT = 0x00000004,
        WMDM_STATUS_DEVICECONTROL_PLAYING = 0x00000008,
        WMDM_STATUS_DEVICECONTROL_RECORDING = 0x00000010,
        WMDM_STATUS_DEVICECONTROL_PAUSED = 0x00000020,
        WMDM_STATUS_DEVICECONTROL_REMOTE = 0x00000040,
        WMDM_STATUS_DEVICECONTROL_STREAM = 0x00000080,
        WMDM_STATUS_STORAGE_NOTPRESENT = 0x00000100,
        WMDM_STATUS_STORAGE_INITIALIZING = 0x00000200,
        WMDM_STATUS_STORAGE_BROKEN = 0x00000400,
        WMDM_STATUS_STORAGE_NOTSUPPORTED = 0x00000800,
        WMDM_STATUS_STORAGE_UNFORMATTED = 0x00001000,
        WMDM_STATUS_STORAGECONTROL_INSERTING = 0x00002000,
        WMDM_STATUS_STORAGECONTROL_DELETING = 0x00004000,
        WMDM_STATUS_STORAGECONTROL_APPENDING = 0x00008000,
        WMDM_STATUS_STORAGECONTROL_MOVING = 0x00010000,
        WMDM_STATUS_STORAGECONTROL_READING = 0x00020000,
    };

    internal static class WMDM_DATATYPE_DESC
    {
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMFileName = "WMDM/FileName";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMFormatCode = "WMDM/FormatCode";
        //Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME
        public static string g_wszWMDMLastModifiedDate = "WMDM/LastModifiedDate";
        //Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME
        public static string g_wszWMDMFileCreationDate = "WMDM/FileCreationDate";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMFileSize = "WMDM/FileSize";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMFileAttributes = "WMDM/FileAttributes";
        //Format code: WAVE Format
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszAudioWAVECodec = "WMDM/AudioWAVECodec";
        //Format code: FOURCC code 
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszVideoFourCCCodec = "WMDM/VideoFourCCCodec";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMTitle = "WMDM/Title";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMAuthor = "WMDM/Author";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMDescription = "WMDM/Description";
        //Type: BOOL, WMDM_TAG_DATATYPE: WMDM_TYPE_BOOL
        public static string g_wszWMDMIsProtected = "WMDM/IsProtected";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMAlbumTitle = "WMDM/AlbumTitle";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMAlbumArtist = "WMDM/AlbumArtist";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMTrack = "WMDM/Track";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMGenre = "WMDM/Genre";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMTrackMood = "WMDM/TrackMood";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMAlbumCoverFormat = "WMDM/AlbumCoverFormat";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMAlbumCoverSize = "WMDM/AlbumCoverSize";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMAlbumCoverHeight = "WMDM/AlbumCoverHeight";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMAlbumCoverWidth = "WMDM/AlbumCoverWidth";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMAlbumCoverDuration = "WMDM/AlbumCoverDuration";
        //Type: BYTE*, WMDM_TAG_DATATYPE: WMDM_TYPE_BINARY
        public static string g_wszWMDMAlbumCoverData = "WMDM/AlbumCoverData";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMYear = "WMDM/Year";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMComposer = "WMDM/Composer";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMCodec = "WMDM/Codec";
        public static string g_wszWMDMDRMId = "WMDM/DRMId";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMBitrate = "WMDM/Bitrate";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMBitRateType = "WMDM/BitRateType";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMSampleRate = "WMDM/SampleRate";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMNumChannels = "WMDM/NumChannels";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMBlockAlignment = "WMDM/BlockAlignment";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMAudioBitDepth = "WMDM/AudioBitDepth";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMTotalBitrate = "WMDM/TotalBitrate";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMVideoBitrate = "WMDM/VideoBitrate";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMFrameRate = "WMDM/FrameRate";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMScanType = "WMDM/ScanType";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMKeyFrameDistance = "WMDM/KeyFrameDistance";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMBufferSize = "WMDM/BufferSize";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMQualitySetting = "WMDM/QualitySetting";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMEncodingProfile = "WMDM/EncodingProfile";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMDuration = "WMDM/Duration";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMAlbumArt = "WMDM/AlbumArt";
        //Type: BOOL, WMDM_TAG_DATATYPE: WMDM_TYPE_BOOL
        public static string g_wszWMDMBuyNow = "WMDM/BuyNow";
        //Type: BOOL, WMDM_TAG_DATATYPE: WMDM_TYPE_BOOL
        public static string g_wszWMDMNonConsumable = "WMDM/NonConsumable";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMediaClassPrimaryID = "WMDM/MediaClassPrimaryID";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMMediaClassSecondaryID = "WMDM/MediaClassSecondaryID";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMUserEffectiveRating = "WMDM/UserEffectiveRating";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMUserRating = "WMDM/UserRating";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMUserRatingOnDevice = "WMDM/UserRatingOnDevice";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMPlayCount = "WMDM/PlayCount";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMDevicePlayCount = "WMDM/DevicePlayCount";
        //Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME
        public static string g_wszWMDMAuthorDate = "WMDM/AuthorDate";
        //Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME
        public static string g_wszWMDMUserLastPlayTime = "WMDM/UserLastPlayTime";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMSubTitle = "WMDM/SubTitle";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMSubTitleDescription = "WMDM/SubTitleDescription";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMMediaCredits = "WMDM/MediaCredits";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMMediaStationName = "WMDM/MediaStationName";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMMediaOriginalChannel = "WMDM/MediaOriginalChanne";
        //Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME
        public static string g_wszWMDMMediaOriginalBroadcastDateTime = "WMDM/MediaOriginalBroadcastDateTime";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMProviderCopyright = "WMDM/ProviderCopyright";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMSyncID = "WMDM/SyncID";
        //Type: GUID, WMDM_TAG_DATATYPE: WMDM_TYPE_GUID
        public static string g_wszWMDMPersistentUniqueID = "WMDM/PersistentUniqueID";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMWidth = "WMDM/Width";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMHeight = "WMDM/Height";
        //Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME
        public static string g_wszWMDMSyncTime = "WMDM/SyncTime";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMParentalRating = "WMDM/ParentalRating";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMMetaGenre = "WMDM/MetaGenre";
        //Type: BOOL, WMDM_TAG_DATATYPE: WMDM_TYPE_BOOL
        public static string g_wszWMDMIsRepeat = "WMDM/IsRepeat";
        // Device properties
        //PROPVARIANT vt = VT_BSTR | VT_ARRAY
        public static string g_wszWMDMSupportedDeviceProperties = "WMDM/SupportedDeviceProperties";
        //PROPVARIANT vt = VT_BSTR
        public static string g_wszWMDMDeviceFriendlyName = "WMDM/DeviceFriendlyName";
        //PROPVARIANT vt = VT_UI4 | VT_ARRAY
        public static string g_wszWMDMFormatsSupported = "WMDM/FormatsSupported";
        //PROPVARIANT vt = VT_BOOL
        public static string g_wszWMDMFormatsSupportedAreOrdered = "WMDM/FormatsSupportedAreOrdered";
        //PROPVARIANT vt = VT_BSTR
        public static string g_wszWMDMSyncRelationshipID = "WMDM/SyncRelationshipID";
        //PROPVARIANT vt = VT_BSTR
        public static string g_wszWMDMDeviceModelName = "WMDM/DeviceModelName";
        //PROPVARIANT vt = VT_BSTR
        public static string g_wszWMDMDeviceFirmwareVersion = "WMDM/DeviceFirmwareVersion";
        //PROPVARIANT vt = VT_BSTR
        public static string g_wszWMDMDeviceVendorExtension = "WMDM/DeviceVendorExtension";
        //PROPVARIANT vt = VT_CLSID
        public static string g_wszWMDMDeviceProtocol = "WMDM/DeviceProtoco";
        //PROPVARIANT vt = VT_CLSID
        public static string g_wszWMDMDeviceServiceProviderVendor = "WMDM/DeviceServiceProviderVendor";
        //PROPVARIANT vt = VT_BSTR
        public static string g_wszWMDMDeviceRevocationInfo = "WMDM/DeviceRevocationInfo";
        //PROPVARIANT vt = VT_BSTR
        public static string g_wszWMDMCollectionID = "WMDM/CollectionID";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMOwner = "WMDM/Owner";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMEditor = "WMDM/Editor";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMWebmaster = "WMDM/Webmaster";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMSourceURL = "WMDM/SourceUR";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMDestinationURL = "WMDM/DestinationUR";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMCategory = "WMDM/Category";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMTimeBookmark = "WMDM/TimeBookmark";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMObjectBookmark = "WMDM/ObjectBookmark";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMByteBookmark = "WMDM/ByteBookmark";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMDataOffset = "WMDM/DataOffset";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMDataLength = "WMDM/DataLength";
        //Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD
        public static string g_wszWMDMDataUnits = "WMDM/DataUnits";
        //Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD
        public static string g_wszWMDMTimeToLive = "WMDM/TimeToLive";
        //Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING
        public static string g_wszWMDMMediaGuid = "WMDM/MediaGuid";
        //Type: BYTE*, WMDM_TAG_DATATYPE: WMDM_TYPE_BINARY
        public static string g_wszWPDPassthroughPropertyValues = "WPD/PassthroughPropertyValues";
    };

    internal enum WMDM_ERROR : uint
    {
        WMDM_E_BUSY                             = 0x80045000,
        WMDM_E_INTERFACEDEAD                    = 0x80045001,
        WMDM_E_INVALIDTYPE                      = 0x80045002,
        WMDM_E_PROCESSFAILED                    = 0x80045003,
        WMDM_E_NOTSUPPORTED                     = 0x80045004,
        WMDM_E_NOTCERTIFIED                     = 0x80045005,
        WMDM_E_NORIGHTS = 0x80045006,
        WMDM_E_CALL_OUT_OF_SEQUENCE = 0x80045007,
        WMDM_E_BUFFERTOOSMALL = 0x80045008,
        WMDM_E_MOREDATA = 0x80045009,
        WMDM_E_MAC_CHECK_FAILED = 0x8004500A,
        WMDM_E_USER_CANCELLED = 0x8004500B,
        WMDM_E_SDMI_TRIGGER = 0x8004500C,
        WMDM_E_SDMI_NOMORECOPIES = 0x8004500D,
        WMDM_E_REVOKED = 0x8004500E,
        WMDM_E_LICENSE_NOTEXIST = 0x8004500F,
        WMDM_E_INCORRECT_APPSEC = 0x80045010,
        WMDM_E_INCORRECT_RIGHTS = 0x80045011,
        WMDM_E_LICENSE_EXPIRED = 0x80045012,
        WMDM_E_CANTOPEN_PMSN_SERVICE_PIPE = 0x80045013,
        WMDM_E_TOO_MANY_SESSIONS = 0x80045013,
    };

    internal static class WMDM_PROGRSS_EVENT_ID
    {
        public static Guid EVENT_WMDM_CONTENT_TRANSFER = new Guid(0x339C9BF4, 0xBCFE, 0x4ED8, 0x94, 0xDF, 0xEA, 0xF8, 0xC2, 0x6A, 0xB6, 0x1B);
        public static Guid SCP_EVENTID_ACQSECURECLOCK = new Guid(0x86248cc9, 0x4a59, 0x43e2, 0x91, 0x46, 0x48, 0xa7, 0xf3, 0xf4, 0x14, 0xc);
        public static Guid SCP_EVENTID_NEEDTOINDIV = new Guid(0x87a507c7, 0xb469, 0x4386, 0xb9, 0x76, 0xd5, 0xd1, 0xce, 0x53, 0x8a, 0x6f);
        public static Guid SCP_EVENTID_DRMINFO = new Guid(0x213dd287, 0x41d2, 0x432b, 0x9e, 0x3f, 0x3b, 0x4f, 0x7b, 0x35, 0x81, 0xdd);
        public static Guid SCP_PARAMID_DRMVERSION = new Guid(0x41d0155d, 0x7cc7, 0x4217, 0xad, 0xa9, 0x00, 0x50, 0x74, 0x62, 0x4d, 0xa4);
    };

    internal static class WMDM_DEVICE_PROTOCOL
    {
        public static Guid WMDM_DEVICE_PROTOCOL_MTP = new Guid(0x979e54e5, 0xafc, 0x4604, 0x8d, 0x93, 0xdc, 0x79, 0x8a, 0x4b, 0xcf, 0x45);
        public static Guid WMDM_DEVICE_PROTOCOL_RAPI = new Guid(0x2a11ed91, 0x8c8f, 0x41e4, 0x82, 0xd1, 0x83, 0x86, 0xe0, 0x3, 0x56, 0x1c);
        public static Guid WMDM_DEVICE_PROTOCOL_MSC = new Guid(0xa4d2c26c, 0xa881, 0x44bb, 0xbd, 0x5d, 0x1f, 0x70, 0x3c, 0x71, 0xf7, 0xa9);
    };

    internal static class WMDM_SERVICE_PROVIDER_VENDOR
    {
        public static Guid WMDM_SERVICE_PROVIDER_VENDOR_MICROSOFT = new Guid(0x7de8686d, 0x78ee, 0x43ea, 0xa4, 0x96, 0xc6, 0x25, 0xac, 0x91, 0xcc, 0x5d);
    };
}
